package com.tebiecloud.order.client.constatns;

/**
 * 常量值
 * @Author: tebie
 * @Date: 2019-09-15 16:10
 */
public class OrderConstants {

    /**
     * 服务名称
     */
    public static final String ORDER_SERVER = "tebie-cloud-order-server";

    /**
     * 订单超时时间，单位秒
     */
    public static final int PAY_OUTTIME = 30 * 60;

    /**
     * 订单退款锁，
     */
    public static final String REDIS_REFUND_LOCK_ = "order:" + "refund_lock_";

    /**
     * 订单二维码，set方法后接订单id，值：OrderQrcode
     */
    public static final String REDIS_QRCODE_ = "order:" + "qrcode_";

    /**
     * 预约订单二维码，set方法后接预约id，值：ReserveQrcode
     */
    public static final String REDIS_RESERVE_QRCODE_ = "order:" + "reserve_qrcode_";

    /**
     * 订单核算.set方法后接门店id和日期
     */
    public static final String REDIS_ORDERSTATS2_ = "order:" + "orderstats2_";

    /**
     * 订单核算.set方法后接门店id和userId
     */
    public static final String REDIS_ORDERSTATS1_ = "order:" + "orderstats1_";

    /**
     * 订单二维码场景值，后接订单id
     */
    public static final String ORDER_QRCODE_SCENESTR_ = "tebiecloud:order:qrcode:scenestr:";

    /**
     * 预约订单二维码场景值，后接预约id
     */
    public static final String RESERVE_QRCODE_SCENESTR_ = "tebiecloud:reserve:qrcode:scenestr:";

    /**
     * 门店二维码场景值，后接门店id
     */
    public static final String STORE_QRCODE_SCENESTR_ = "tebiecloud:store:qrcode:scenestr:";

    /**
     * 门店预约编号，set方法后接门店id和日期，过期时间是凌晨12点
     */
    public static final String STORE_RESERVER_NUMBER_ = "tebiecloud:store:reserve_";

    /**
     * 门店预约编号锁
     */
    public static final String REDIS_RESERVER_NUMBER_ = "tebiecloud:store:reserve_lock_";

    /**
     * 门店预约通知锁，set方法后接门店id
     */
    public static final String REDIS_RESERVER_STORE_ = "tebiecloud:store:notice_lock_";

    /**
     * 0已取消
     */
    public static final int ORDER_STATUS_CANCELL = 0;
    /**
     * 1待付款
     */
    public static final int ORDER_STATUS_PREPAY = 1;
    /**
     * 2已付款
     */
    public static final int ORDER_STATUS_PAID = 2;
    /**
     * 4已核销（已完成）
     */
    public static final int ORDER_STATUS_COMPLETED = 4;
    /**
     * 6已退款
     */
    public static final int ORDER_STATUS_REFUND = 6;

    /**
     * 定义排队单坑数
     */
    public static final int RESERVE_NUM = 3;

}
